//
//  GQJSingletonController160819.m
//  TotalDemo
//
//  Created by gujian on 16/8/19.
//  Copyright © 2016年 gujian. All rights reserved.
//

#import "GQJSingletonController160819.h"
#import "LBAnimation.h"

OBJC_EXTERN int _objc_rootRetainCount(id);

@interface GQJSingletonController160819 ()

@end

@implementation GQJSingletonController160819

- (void)viewDidLoad {
    [super viewDidLoad];

    LBAnimation *lbAnimation = [LBAnimation sharedInstance];
    
    LotLog(@"init reatinCount:%d",_objc_rootRetainCount(lbAnimation));
    
    lbAnimation = nil;
    
    LotLog(@"1rlease reatinCount:%d",_objc_rootRetainCount(lbAnimation));
    
    for (int i = 0; i < 10; i++) {
        lbAnimation = [LBAnimation sharedInstance];
        LotLog(@"%drlease reatinCount:%d",i,_objc_rootRetainCount(lbAnimation));

        lbAnimation = nil;
    }
    
    
    static UIImage *img;
    img = [UIImage imageNamed:@"sun"];
    
    LotLog(@"init img retainCount:%d", _objc_rootRetainCount(img));
    
    img = nil;
    
    LotLog(@"release img retainCount:%d", _objc_rootRetainCount(img));
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
